import logging

# __log_path = LOG_PATH + "xiaonenglog.logs"

__log_path = r"..\\logs\xiaonenglog.logs"
__input_format = '%(asctime)s - %(pathname)s[line:%(lineno)d] - %(levelname)s: %(message)s'

logging.basicConfig(level=logging.INFO, format=__input_format, filename=__log_path)


def xnlog(mgs):
    if isinstance(mgs, str):
        logging.info(mgs)
    else:
        logging.info(str(mgs))


if __name__ == '__main__':
    xnlog(222222)

# 输入到控制台
# logging.basicConfig(level=logging.ERROR, format=__input_format)


# 输入到文件中
# logging.basicConfig(level=logging.DEBUG, format=__input_format, filename=__log_path, filemode="a")


# def logInfo(msg):
#     if isinstance(msg, str):
#         logging.info(msg)
#     else:
#         logging.info(str(msg))


# if __name__ == '__main__':
#     logInfo(222)
